<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
  <h:head>
    <title>SpeedPrevWeb</title>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>

    <!-- Styles -->
    <link href="../css/bootstrap.css" rel="stylesheet"/>
    <link href="../css/bootstrap-responsive.css" rel="stylesheet"/>
    <link href="../css/bootstrap-overrides.css" rel="stylesheet"/>
    <!--<link href="../css/overcast/jquery-ui-1.10.4.custom.css" rel="stylesheet"/>-->
    <link href="../css/slate.css" rel="stylesheet"/>
    <link href="../css/slate-responsive.css" rel="stylesheet"/>

    <!-- Javascript -->
    <script src="../js/jquery-1.7.2.min.js"/>
    <!-- <script src="../js/overcast/jquery-ui-1.10.4.custom.min.js"/> -->
    <script src="../js/jquery.ui.touch-punch.min.js"/>
    <script src="../js/bootstrap.js"/>
    <script src="../js/Slate.js"/>
    <script src="../js/plugins/excanvas/excanvas.min.js"/>
    <script src="../js/plugins/flot/jquery.flot.js"/>
    <script src="../js/plugins/flot/jquery.flot.orderBars.js"/>
    <script src="../js/plugins/flot/jquery.flot.pie.js"/>
    <script src="../js/plugins/flot/jquery.flot.resize.js"/>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

    <script type="text/javascript">
      $(function() {
        $(":file").change(function() {
          if (this.files and this.files[0]) {
            var reader = new FileReader();
            reader.onload = imageIsLoaded;
            reader.readAsDataURL(this.files[0]);
          }
        });
      });
    </script>

    <script>
      function handleFileSelect(evt) {
        var files = evt.target.files; // FileList object

        // files is a FileList of File objects. List some properties.
        var output = [];
        for (var i = 0, f; f = files[i]; i++) {
          output.push('<li><strong>', escape(f.name), '</strong> (', f.type || 'n/a', ') - ',
                  f.size, ' bytes, last modified: ',
                  f.lastModifiedDate.toLocaleDateString(), '</li>');
        }
        document.getElementById('list').innerHTML = '<ul>' + output.join('') + '</ul>';
      }
      document.getElementById('files').addEventListener('change', handleFileSelect, false);
    </script>

  </h:head>

  <h:body>

    <!-- header -->
    <div id="header">
      <div class="container">			
        <h1><a href="index.jsf">SpeedPrevWeb 1.0</a></h1>			

        <div id="info">				
          <a href="javascript:;" id="info-trigger">
            <i class="icon-cog"></i>
          </a>

          <div id="info-menu">
            <div class="info-details">
              <h4>Bem vindo #{loginBean.usuario.nmUsuario}.</h4>
            </div> 

          </div> 
        </div> 
      </div> 
    </div> 
    <!-- /#header -->

    <!-- barra menus -->
    <div id="nav">
      <div class="container">
        <a href="javascript:;" class="btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <i class="icon-reorder"></i>
        </a>
        <div class="nav-collapse">
          <ul class="nav">
            <li class="nav-icon active">
              <a href="../index.jsf">
                <i class="icon-home"></i>
                <span>Home</span>
              </a>	    				
            </li>

            <li class="dropdown">					
              <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                <i class="icon-th"></i>
                Cadastros
                <b class="caret"></b>
              </a>	
              <ul class="dropdown-menu">
                <li><a href="cadastros/Cliente.jsf">Cliente</a></li>
                <li><a href="cadastros/Ocorrencia.jsf">Código de Ocorrência</a></li>
                <li><a href="cadastros/FilaAnalise.jsf">Fila de Análise</a></li>                
                <li><a href="cadastros/OrgaoLotacao.jsf">Órgão de Lotação</a></li>
                <li><a href="cadastros/Previdencia.jsf">Previdência</a></li>
                <li><a href="cadastros/StatusRequerimento.jsf">Status de Requerimento</a></li>
                <!--<li><a href="./cadastros/Servidor.jsf">Servidor</a></li>-->
                <li><a href="cadastros/TipoAverbacao.jsf">Tipo de Averbação</a></li>
                <li><a href="cadastros/TipoBeneficio.jsf">Tipo de Benefício</a></li>
                <!--<li><a href="./cadastros/TipoDocumento.jsf">Tipo de Documento</a></li>-->
                <li><a href="cadastros/TipoIndeferimento.jsf">Tipo de Indeferimento</a></li>
                <!--<li><a href="./cadastros/TipoOcorrencia.jsf">Tipo de Ocorrência</a></li>-->
                <li><a href="cadastros/TipoRegime.jsf">Tipo de Regime</a></li>
                <li><a href="cadastros/TipoRequerimento.jsf">Tipo de Requerimento</a></li>
                <li><a href="cadastros/Usuario.jsf">Usuários</a></li>
              </ul>    				
            </li>

            <li class="dropdown">					
              <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                <i class="icon-th"></i>
                Exportação de Arquivos
                <b class="caret"></b>
              </a>	
              <ul class="dropdown-menu">
              </ul>    				
            </li>                      

            <li class="dropdown">					
              <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                <i class="icon-th"></i>
                Importação de Arquivos
                <b class="caret"></b>
              </a>	
              <ul class="dropdown-menu">
                <li><a href="./importacaoarquivos/Aposentado.jsf">Aposentados</a></li>
                <li><a href="./importacaoarquivos/CodigoOcorrencia.jsf">Códigos de Ocorrência</a></li>
                <li><a href="./importacaoarquivos/OrgaoLotacao.jsf">Órgãos de Lotação</a></li>
                <li><a href="./importacaoarquivos/Pensionista.jsf">Pensionistas</a></li>
                <li><a href="./importacaoarquivos/OcorrenciaAposentado.jsf">Ocorrências de Aposentados</a></li>
                <li><a href="./importacaoarquivos/OcorrenciaPensionista.jsf">Ocorrências de Pensionistas</a></li>
                <li><a href="./importacaoarquivos/StatusReuqerimento.jsf">Status de Requerimento</a></li>

                <li><a href="./importacaoarquivos/TipoAverbacao.jsf">Tipo de Averbação</a></li>
                <li><a href="./importacaoarquivos/TipoBeneficio.jsf">Tipo de Benefício</a></li>
                <li><a href="./importacaoarquivos/TipoIndeferimento.jsf">Tipo de Indeferimento</a></li>
                <li><a href="./importacaoarquivos/TipoRegime.jsf">Tipo de Regime</a></li>
                <li><a href="./importacaoarquivos/TipoRequerimento.jsf">Tipo de Requerimento</a></li>
              </ul>    				
            </li>

            <li class="dropdown">					
              <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                <i class="icon-th"></i>
                Relatórios
                <b class="caret"></b>
              </a>	
              <ul class="dropdown-menu">

              </ul>    				
            </li>

            <li class="dropdown">					
              <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                <i class="icon-th"></i>
                Análise
                <b class="caret"></b>
              </a>	
              <ul class="dropdown-menu">

              </ul>    				
            </li>
          </ul>
        </div>
      </div>
    </div>
    <!-- /barra menus -->

    <!-- container -->
    <div id="content">
      <div class="container">
        <div class="row">

          <!-- DataTable -->
          <div class="span12">
            <!-- <div class="widget-content"> -->
            <h:form id="formImpOcorr"  enctype="multipart/form-data">  
              <div id="page-title" class="clearfix">

                <p:panelGrid columns="1" styleClass="semBorda">
                  <p:inputText style="width: 450px" type="file" id="files" />
                <output id="list"></output>
                </p:panelGrid>

                <p:panelGrid columns="4" styleClass="semBorda">
                  <h:commandButton class="btn btn-secondary btn-regular" 
                                   style="width: 160px"
                                   value="Validar arquivo" 
                                   action="#{importarOcorrenciaBean.lerArquivo}"/>       
                  <h:commandButton class="btn btn-secondary btn-regular" 
                                   style="width: 160px"
                                   value="Importar arquivo" 
                                   action="#{tipoRequerimentoBean.preparaAlterarTipoRequerimento}"/>       
                </p:panelGrid>



              </div>
            </h:form>
          </div>
        </div>
      </div>
    </div>
    <!-- DataTable -->
  </h:body>
</html>
